<ion-item-divider [sticky]="true">
    <ion-label>
        <h2>{{ 'addon.block_starredcourses.pluginname' | translate }}</h2>
    </ion-label>
    <div slot="end" class="flex-row">
        <core-horizontal-scroll-controls #scrollControls [aria-controls]="scrollElementId" />
    </div>
</ion-item-divider>
<core-loading [hideUntil]="loaded" placeholderType="row" placeholderWidth="280px" placeholderHeight="134px" [placeholderLimit]="4">
    @if (courses.length === 0) {
        <core-empty-box image="assets/img/icons/courses.svg" [message]="'addon.block_starredcourses.nocourses' | translate" />
    }
    <!-- List of courses. -->
    <div [hidden]="courses.length === 0" [id]="scrollElementId" class="core-horizontal-scroll"
        (scroll)="scrollControls.updateScrollPosition()">
        <div (onResize)="scrollControls.updateScrollPosition()" class="flex-row core-course-list">
            <ng-container *ngFor="let course of courses">
                <core-courses-course-list-item [course]="course" class="core-block_starredcourses" layout="summarycard" />
            </ng-container>
        </div>
    </div>
</core-loading>
